package com.xxx.rpc.sample.client.controllers;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xxx.rpc.common.annos.Reference;
import com.xxx.rpc.sample.bean.Person;
import com.xxx.rpc.sample.client.local.LocalService;
import com.xxx.rpc.sample.remote.HelloService;
@Controller
public class DemoController {
	@Reference
	private HelloService helloService;
	@Resource
	private LocalService localService;
    @RequestMapping("/demo")
    public String case01() {
        String result = helloService.hello(new Person("Yong", "Huang"));
        System.out.println(result);
        String result1 = localService.hello("订单号");
        System.out.println(result1);
		return result+"-"+result1;
    }
    
    @RequestMapping("/index")
	public String index() {
		return "index";
	}
}
